ref(explore): Migrate replayQueryParamsProvider to nuqs#115422
Conversation
…cation to nuqs Replace the deprecated updateNullableLocation pattern with nuqs useQueryStates for managing URL query params in the replay list provider. This removes dependencies on useLocation, useNavigate, and manual Location object mutation.
📊 Type Coverage Diff✅ No new type safety issues introduced. Coverage: 93.50% |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4c98b10. Configure here.
| const target = getTargetWithReadableQueryParams(location, writableQueryParams); | ||
| navigate(target); | ||
| setNuqsParams({ | ||
| query: writableQueryParams.query ?? null, |
There was a problem hiding this comment.
Undefined query coerced to null changes preservation semantics
Low Severity
The expression writableQueryParams.query ?? null collapses undefined into null. With the old updateNullableLocation, passing undefined was a no-op (the current query param was preserved), while null removed it from the URL. With nuqs, null also removes the param, and undefined leaves it as-is. The ?? null coercion means any caller passing a WritableQueryParams without a query field will now inadvertently clear the query from the URL instead of preserving it. No current replay component triggers this path, but it breaks the semantic contract of the old code.
Reviewed by Cursor Bugbot for commit 4c98b10. Configure here.


Summary
updateNullableLocationpattern with nuqsuseQueryStatesin the replay list query params provideruseLocation,useNavigate,getQueryFromLocation, andsavedQueryhelpersupdateNullableLocationand migrate all callsites to nuqsTest plan